package com.lyon.custom.config;

import com.google.common.collect.Lists;
import lombok.Data;
import org.springframework.boot.context.properties.ConfigurationProperties;

import java.util.List;

/**
 * @author LeeYan9
 * @since 2021-11-26
 */
@ConfigurationProperties(prefix = "lyon.config")
@Data
public class LyonConfigProperties {

    private boolean enable;

    private boolean refresh;

    private String namespace;

    private String serverAddr;

    private String dataId;

    private String group;

    private String fileExtension;

    private List<ConfigOuterProperties> sharedConfigs = Lists.newArrayList();
    private List<ConfigOuterProperties> extConfig = Lists.newArrayList();

    @Data
    public static class ConfigOuterProperties {
        private String dataId;
        private String group;
        private String fileExtension;
        private boolean refresh;
    }


}
